<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglib.jsp"%>
<!doctype html>
<html class="x-border-box x-strict x-viewport">
<head>
<%@ include file="/common/head-system.jsp"%>
<title>录入</title>
<script type="text/javascript">
	window.refreshQuery = function() {
		location.reload();
	};
	jQuery(function() {
	});
</script>
</head>
<body class="x-body x-reset x-border-layout-ct x-container">
	<form action="save.do" method="post" id="mainForm">
		<s:token />
		<ext:panel head="录入">
			<s:iterator value="entityWrapper.properties" id="p" status="s">
				<ext:formField labelname="%{#p.data.nameShow}"
					fieldname="%{'m.' + #p.data.nameText}">
					<s:if test='#p.propertyType == "date"'>
						<input type="text" name="m.<s:property value="#p.data.nameText" />"
							value="<s:date name="m[#p.data.columnName]" format="%{#p.dateFormatShow}"/>"
							class="x-form-field Wdate" style="width: 100%"
							onclick="WdatePicker({dateFmt:'<s:property value="#p.dateFormatShow" />'})" />
					</s:if>
					<s:elseif test='#p.hasDateFormat && #p.hasDateFormatShow'>
						<input type="text" name="m.<s:property value="#p.data.nameText" />"
							value="<s:property value="m[#p.data.columnName]" />"
							class="x-form-field Wdate" style="width: 100%"
							onclick="WdatePicker({dateFmt:'<s:property value="#p.data.dateFormat" />'})" />
					</s:elseif>
					<s:elseif test='#p.isDict'>
						<s:select name="%{'m.' + #p.data.nameText}" value="m[#p.data.columnName]" list="#application.M.getDictByTypeForSelect(#p.data.dictType)" listKey="code" listValue="name" />
					</s:elseif>
					<s:else>
						<input type="text" name="m.<s:property value="#p.data.nameText" />"
							value="<s:property value="m[#p.data.columnName]" />"
							class="x-form-field x-form-text" style="width: 100%" />
					</s:else>
				</ext:formField>
			</s:iterator>
		</ext:panel>
		<br />
		<div
			style="width: 100%; height: 34px; text-align: right; padding: 3px 0px;">
			<ext:button name="保存" onclick="jQuery('#mainForm').submit();" />
		</div>
	</form>
	<%@ include file="/common/foot.jsp"%>
</body>
</html>